$(document).ready(function(){
	$(".container-fluid .item").delegate(".title","click",function(e){
		var activityid = $(event.target).parents(".item").find(".col-sm-12:eq(1)>input").val();
		$.ajax({
			url : "http://localhost:8080/CLASS/showActivity.do?",
			data : {
				"activityid" : activityid
			},
			datatype : "json",
			type : "post",
			success: function(json){
				console.log(json);
				var toData = 'json';
				var toObj = eval("(" + toData + ")");
				$("#title").html(toObj.title);
				$("#creater").html(toObj.activitytime + '&nbsp;&nbsp;by&nbsp;&nbsp;' + toObj.creater);
				$("#content").html(toObj.event);
				$("#img").attr("src",toObj.picture);
			},
			error: function(data){
				alert("出错了");
			}
		})
		e.preventDefault();
	})
})
function dropDown(){
	var $hidden =  $(event.target).parents(".item").find(".hidden");
	var $hiddenGt = $(event.target).parents(".item").find(".col-sm-12:gt(0)");
	var $num = $(event.target).parents(".item").find(".number");
	var $nonum = $(event.target).parents(".item").find(".notnumber");
	var $titleDiv = $(event.target).parents(".item");
	$titleDiv.animate({height : "190px"});
	$hidden.removeClass("hidden");
	$num.css("display","block");
	$nonum.css("display","none");
	console.log(!!$hidden);
}

